package com.jichaoyun.sys.controller;//package com.jichaoyun.sys.controller;
//
//import com.jichaoyun.sys.service.StationInspectionService;
//import com.jichaoyun.common.model.PagedResult;
//import com.jichaoyun.common.model.Result;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.*;
//
//import javax.servlet.http.HttpServletResponse;
//import java.io.IOException;
//import java.time.LocalDate;
//import java.time.format.DateTimeFormatter;
//
//@RestController
//@Api(tags = {"巡检接口"})
//@RequestMapping("/sys/inspection")
//public class StationInspectionController {
//
//    @Autowired
//    private StationInspectionService stationInspectionService;
//
//    @ApiOperation("巡检管理，查看巡检记录")
//    @GetMapping("/getInspectionInfo")
//    public Result<PagedResult> getInspectionInfo(String date, Integer pageNo) {//@RequestBody是做json字符串的转换
//        DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
//        LocalDate datetime = LocalDate.parse(date,dateTimeFormatter);
//        return Result.success(stationInspectionService.getStationInspectionInfo(datetime,pageNo,20));
//    }
//
//    @ApiOperation(value = "巡检管理，今日巡检信息导出到excel")
//    @GetMapping("/DownloadTodayStationInspection")
//    public void DownloadTodayStationInspection(String date,HttpServletResponse response) throws IOException {
//
//        stationInspectionService.getStationInspectionExcel(date,response);
//    }
//
//    @ApiOperation(value = "巡检管理，历史巡检信息导出到excel")
//    @GetMapping("/DownloadStationInspection")
//    public void DownloadValveAlarmInfoPage(HttpServletResponse response) throws IOException {
//
//        stationInspectionService.getStationInspectionExcel(response);
//    }
//
//}
